DEV Files
What is a dev?
DEV files are a powerful way for end users to customize their 'device' library in London Architect; they are the representations of devices that are created when dragged out of the Hardware Tree onto the Main layout. Dev files are located in the 'Devices' directory of the London Architect program folder. User created dev files can be organized in user created directories under this main Devices folder, for example ... London Architect/Devices/My Devices/MyVideoServer.dev.
DEV files utilize the very powerful, yet easy to use, XML programming language. If you open up one of the dev files in the Devices directory you will see what the XML looks like. You may already know how to write xml, in which case the following descriptions of the syntax should help you easily create your own device. If not, just look on the web for some tutorials, it's fairly easy. Most of the xml is pretty self explanatory, and you can simply copy an existing file and alter it to suit your purposes.
Description of the various elements included in this dev file:
<?xml version="1.0"?> This is a header telling editors about the file, which may then provide correct formatting or context sensitive colouring. It is optional, and not needed by London Architect.
<device>...¦</device> This starts and ends the device definition script.
<!-- text --> This is a remark statement. Where text is any string or text, this text will be ignored. This is useful in documenting Who, What, When, Where, or Why.
<name> ... </name> This is used to set the name of your device.
<description> ... </description> A description of what it is. (Reserved for future use)
<manufacturer> ... </manufacturer> This tells London Architect where to place the device in the Device tree (in the Hardware pane) and in the right click menu. Typical values would be BSS, Crown, JBL, Soundcraft etc. General devices such as mic are in 'Other'. London Architect will add a new heading to these menus based on the data you have entered here. All additional devices with the same manufacturer will be placed under the same heading.
<group> ... </group> This defines the folder in the Hardware Pane for the DEV file to go into
<size width="######" height="######"/> The size of the device. This is the size it will be when created, and it cannot be re sized any smaller. Where "######" is an integer defining the size in pixels.
<gui order="######" showname="value" showtype="value" resize="value" icon="name" /> General GUI related information.
showname :- Where "value" is true or false. If showname is "true" then the name is drawn above the object.
showtype :- Where "value" is true or false. If showtype is "true" then the type is drawn above the object.
resize :- Where "value" is true or false. If resize is "true" the device can be resized.
icon :- Where "name" is the name of the icon image to use. [e.g. micicon.bmp.] Icons are used in the various trees and menus within London Architect. See the chart below.
order :- Where "######" is an integer value used to sort the devices in the hardware tree view, and on the right click New menu. The higher the value, the higher up the view/list the device will be listed.
Icons
<background image="File"
fill="value"/>
This tells London Architect how to draw
the device.
- Image :-If image is defined it is the name of the image file to use. [e.g. mic.bmp]
- fill :- Where "value" is true or false. If fill is "true" then the background is filled with the fill colour. If you set the image, then often you don't want the background to be drawn. London Architect will center your bmp in the object as defined in the size statement above. For best results resize your bitmap to the same size that you defined for your object. The image file must reside in the Generic directory with the dev file.
<fillcolour red="###"
green="###"
blue="###"
/> or
<fillcolor
red="###"
green="###"
blue="###"
/> Specifies
the fill colour for the background where "###" is a number
between 0 and 255.
<textcolour red="###"
green="###"
blue="###" /> or <textcolor red="###"
green="###"
blue="###"
/> Specifies the text colour for the
node text where "###"
is a number between 0 and 255.
<transparentcolour red="###"
green="###"
blue="###"
/>
or <transparentcolor
red="###"
green="###"
blue="###"
/> Specifies the colour which is to
be considered transparent when drawing the background
image where "###"
is a number between 0 and 255.
<input name="Text" type="value"
visible=" value
"/>
<output name="Text" type="value" visible=" value " signalfrom="inputnode" format=" value"/> Specifies an input or output node. Input nodes are displayed on the left, Output nodes are displayed on the right.
name :- Where "Text" is the name of the node. If not defined, the node text is not drawn. [E.g. name=""]. This is useful for really basic objects such as mics where you really don't want the node text drawn.
type :- Where "value" can be one of the following :-
audio :- Your basic audio node.
digital :- A digital node.
audio+digital :- A node that can take either analogue or digital.
ethernet :- A generic ethernet port.
cobranet1 :- A cobraNet port.
cobranet2 :- A backup cobraNet port.
serial :- A serial port.
control :- A control port.
highpower :- A high power analogue port. E.g. amp output/speaker input.
video :- A composite video port
usb :- A usb port
buddylink :- CobraNet buddylink node.
blulink :- BLU link ethernet port.
blulink+ethernet :- BLU link and standard ethernet port.
fibre :- Fibre optic port.
visible :- Where "value" is true or false. If visible is "true" then the node is visible on the object.
- signalfrom :- Where "inputnode" is the name of the name of the input node that the signal comes from. This is used to provide signal routing through the device. If signalfrom is not specified, the name of the node is shown. This is used on outputs only.
Illegal Characters in a DEV file
There are four characters which are illegal in DEV files and so must be replaced with a special sequence if you wish to use them. These are as follows:
& replace with &
< replace with <
> replace with >
" replace with "
Sample DEV file
Now let's take a closer look at a sample script.
<?xml version="1.0"?>
<device>
- <name>My Video Server</name>
- <description>Composite Video Server</description>
- <manufacturer>ACME</manufacturer>
- <group>Other</group>
- <size width="110" height="80"/>
- <gui icon="ethernet" showname="true" showtype="true" resize="false"/>
- <textcolour red="255" green="255" blue="255"/>
- <!-- Ports-->
- <output name="Audio L" type="audio"/>
- <output name="Audio R" type="audio"/>
- <output name="Video" type="video"/>
- <input name="Ethernet" type="ethernet"/>
</device>
<?xml version="1.0"?> The
first line is the header.
<device> This line defines the beginning of the device script
<name>My Video Server</name> This is the name of your device.
<description>Composite Video Server</description> This is the description of the device.
<manufacturer>ACME</manufacturer> This is the Manufacturer of the device.
<group>Other</group> This defines what group this object is part of.
<size width="110" height="80"/> This defines the size of the graphic object.
<gui icon="ethernet" showname="true" showtype="true" resize="false"/> This defines the icon that London Architect will use in the menu trees, as well as how the graphic object will be displayed on the desktop.
<textcolour red="255" green="255" blue="255"/> This defines the color of the node text on the graphic object.
<!-- Ports--> This is a remark statement used to describe the following section of code.
<output name="Audio L" type="audio"/>
<output name="Audio L" type="audio"/>
<output name="Video" type="video"/>
<input name="Ethernet" type="ethernet"/> These define all the ports on the device.
</device> This ends the device script.
And here is how it looks on the desktop: